The present invention relates to a method of controlling a robot, and more particularly to a method of controlling a playback robot of the type in which major points or positions in space are instructed or recorded to establish a path that the robot should trace, the method being capable of moving the robot back to the original point or position along a predetermined path.
Playback robots which are generally used as robots for repeating certain operations operate on the information which they have previously been taught. According to one method of instructing such a playback robot, items of information such as positions in space and speeds of travel are successively stored in a computer, and when a command is given to start the operation, the stored items of information are successively read out from the computer to enable the robot to carry out the operation based on the stored information. Controlling such a playback robot will be described by way of example with reference to FIGS. 1 and 2 of the accompanying drawings.
For moving a moving component or an end effector of a robot, such as an arm, from a position A to a position D while avoiding an obstacle 2 as shown in FIG. 1, the moving component may be instructed to move from the position A to a position B, to a position C and then to the position D without hitting the obstacle 2. For such robot control, a control mechanism for controlling the movement of the moving component is required to store at least positional data representing the positions A through D as target points. More specifically, when teaching the robot, a teaching device such as a teaching box or teaching pendant is operated by a human operator to establish motion data for each step of travel of the moving component. The motion data thus established is schematically illustrated in FIG. 2. Data for instructing a position or a movement step for the moving component is referred to as a motion data block, which will be employed in the following description. The moving component starts moving from the position A, and hence the position A is essentially equivalent to an original point.
Positional data P.sub.A for positioning the moving component in the original point A constitutes a motion data block 1. A motion data block 2 for moving the moving component from the original point A to the position B includes positional data P.sub.B for indicating a target point and velocity data V.sub.B for indicating a velocity at which the moving component is to travel from the original point A to the position B. A motion data block 3 for moving the moving component from the position B to the position C includes positional data P.sub.C for indicating a target point and velocity data V.sub.C for indicating a velocity at which the moving component is to travel from the position B to the position C. Similarly, a motion data block 4 includes positional data P.sub.D corresponding to the position D and velocity data V.sub.D for indicating a velocity for movement from the position C to the position D. Therefore, the moving component of the robot is displaced according to the group of the successive motion data blocks 1 through 4. Paths of travel between the positions A through D are automatically determined by calculations using predetermined interpolation formulas.
Each of the motion data blocks is executed to ascertain whether the data contents thus taught are appropriate or not. If an error is found, the motion data block including the error is corrected. For example, when changing the path from the original point A to the position D after the moving component has been moved to the position D, the moving component is moved back to the original point A and new motion data blocks are established. With a command to return the moving component from the position D to the original point A, the moving component would generally move along a straight line from the position D to the original point A as indicated by the dotted line in FIG. 1, resulting in a collision between the moving component and the obstacle 2. In reality, therefore, it is necessary to first move the moving component to a position E from which it could reach the origin A along a straight line without hitting the obstacle 2, and then to command the moving component to return to the original point A. To move the moving component from the position D to the position E, the robot must be driven sequentially through manual operation of a human operator.
However, where an obstacle of a complex shape or a plurality of obstacles are located closely to the robot, it is difficult to control the robot manually. It is highly complex to manually operate the robot which has a plurality of degrees of freedom. Unless such manual operation were properly carried out, the robot would be highly likely to collide with the obstacle. Therefore, the operator is required to strain to manually operate the robot and has to be highly skilled in the manual operation of the robot.